import request from '../../request/index.js'

/**
 * @
 * 商品详情页获取商品
 */
export function getDetailGoods(id){
	let url = `/api/home/goods/info/${id}`
	return request.get(url)
}

/**
 * @
 * 商品详情页加入购物车
 */
export function getJoinShopCar(goodsId,skuName,quantity){
	if(!quantity)quantity=1
	    let url = '/api/cart/add'
	    let data = {
	        goodsId,skuName,quantity
	    }
	    return request.post(url,data)
}